import React from 'react'
import {useLocation} from "react-router-dom"
function Detail1() {
  let location = useLocation()
  console.log(location);
  return (
    <div>
        {
            location.state && <div>
                <img src={location.state.img} alt="" />
                <h4>{location.state.tit}</h4>
            </div>
        }
    </div>
  )
}

export default Detail1